home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / super_fly.swf / scripts / frame_74 / DoAction.as
Text File  |  2012-01-07  |  2KB  |  85 lines

  1. flyCount = "10";
  2. bindex = "1";
  3. index = "1";
  4. while("2" >= bindex)
  5. {
  6.    if(getProperty("/buzz" add index add "/fly1", _X) < mouse_x + "15" and mouse_x - "15" < getProperty("/buzz" add index add "/fly1", _X))
  7.    {
  8.       if(getProperty("/buzz" add index add "/fly1", _Y) < mouse_y + "15" and mouse_y - "15" < getProperty("/buzz" add index add "/fly1", _Y))
  9.       {
  10.          set("/dline:caught","3");
  11.          beeHit += "1";
  12.          tellTarget("/buzz" add index)
  13.          {
  14.             gotoAndPlay(1);
  15.          }
  16.          index = "11";
  17.          bindex = "3";
  18.          setProperty("/beePnt" add beeHit, _visible, "1");
  19.       }
  20.       else
  21.       {
  22.          bindex += "1";
  23.       }
  24.    }
  25.    else
  26.    {
  27.       bindex += "1";
  28.    }
  29. }
  30. if(index < "11")
  31. {
  32.    if(getProperty("/dfly/fly1", _X) < mouse_x + "20" and mouse_x - "20" < getProperty("/dfly/fly1", _X))
  33.    {
  34.       if(getProperty("/dfly/fly1", _Y) < mouse_y + "20" and mouse_y - "20" < getProperty("/dfly/fly1", _Y))
  35.       {
  36.          set("/dline:caught","2");
  37.          score += "20";
  38.          index = "11";
  39.          tellTarget("/dfly")
  40.          {
  41.             gotoAndStop(11);
  42.          }
  43.       }
  44.    }
  45.    if(getProperty("/bfly/fly1", _X) < mouse_x + "30" and mouse_x - "30" < getProperty("/bfly/fly1", _X))
  46.    {
  47.       if(getProperty("/bfly", _Y) < mouse_y + "30" and mouse_y - "30" < getProperty("/bfly", _Y))
  48.       {
  49.          set("/dline:caught","4");
  50.          score += "30";
  51.          index = "11";
  52.          tellTarget("/bfly")
  53.          {
  54.             gotoAndStop(getProperty("/bfly", _currentframe));
  55.          }
  56.       }
  57.    }
  58. }
  59. while(flyCount >= index)
  60. {
  61.    if(getProperty("/flyin" add index add "/fly1", _X) < mouse_x + "15" and mouse_x - "15" < getProperty("/flyin" add index add "/fly1", _X))
  62.    {
  63.       if(getProperty("/flyin" add index add "/fly1", _Y) < mouse_y + "15" and mouse_y - "15" < getProperty("/flyin" add index add "/fly1", _Y))
  64.       {
  65.          set("/dline:caught","1");
  66.          score += "10";
  67.          flyCaught += "1";
  68.          set("/dline:gotcha",index);
  69.          tellTarget("/flyin" add index)
  70.          {
  71.             gotoAndStop(11);
  72.          }
  73.          index = "11";
  74.       }
  75.       else
  76.       {
  77.          index += "1";
  78.       }
  79.    }
  80.    else
  81.    {
  82.       index += "1";
  83.    }
  84. }
  85.